<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/4/19
 * Time: 11:05
 */

namespace app\domain;

use app\server\StickUser as modelStick;

class StickUser
{

    public function insertUserInfo($data) {

        $data['create_time'] = date('Y-m-d H:i:s');

        $data = modelStick::insertUserInfo($data);

        return $data;
    }

    public function getStickUserInfo($where, $field) {

        $userInfo = modelStick::getStickUserInfo($where, $field);

        return $userInfo;
    }

    public function updateUserInfo ($where, $data) {

        $res = modelStick::updateUserInfo($where, $data);

        return $res;
    }

    public function updatePicCount($user_id, $count) {

        $sql = "UPDATE `mp_stick_user` SET `account_pic`=account_pic+$count WHERE `user_id` = $user_id";

        $data = modelStick::updatePicCount($sql);

        return $data;
    }

    public function getUserList ($where, $field, $page, $order) {

        $list = modelStick::getUserList($where, $field, $page, $order);

        return $list;
    }
}